package com.igeek.print;

/**
 * 打印机系统
 */
public class PrintSys {

    private static StudentInfo[] studentInfos = null;

    private static ScoreInfo[] scoreInfos = null;

    private static TeacherInfo[] teacherInfo = null;
    /**
     * 做一些初始化的操作
     */
    static {

        studentInfos = new StudentInfo[10];

        scoreInfos = new ScoreInfo[10];

        teacherInfo = new TeacherInfo[10];

        for (int i = 0;i<10;i++){
            studentInfos[i] = new StudentInfo("1001"+i,"学生"+i,"男",20);

            scoreInfos[i] = new ScoreInfo("1001"+i,"c100"+i,"课程——"+i,60);

            teacherInfo[i] = new TeacherInfo("教师——"+i,50,"专业——"+i);
        }
    }

    public void print(Printer printer,Info info){
        printer.printInfo(info);
    }

    public void print(Printer printer,Info[] infos){
        printer.printInfo(infos);
    }

    public static void main(String[] args) {
        PrintSys printSys = new PrintSys();

        printSys.print(new BlackPrinter(),PrintSys.scoreInfos);
    }
}
